package com.caopeng.achievementmanagement.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.ibatis.annotations.ConstructorArgs;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author Crescent_P
 * @date 2021-12-05 10:33
 */
// 成果实体类
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor

public class Achievement {
    private long id;
    private String title;
    private String type;
    private String direction;
    private String detail;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;
    private String fileUrl;
    private User user;          // 成果上传人
    private Integer uid;        // 成果上传人id

    public Achievement(long id, String title, String type, String direction, String detail, Date date, String fileUrl, Integer uid) {
        this.id = id;
        this.title = title;
        this.type = type;
        this.direction = direction;
        this.detail = detail;
        this.date = date;
        this.fileUrl = fileUrl;
        this.uid = uid;
    }
}
